home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / da / virusdet.sit / VirusDetective™.rsrc / TEXT_-15998_VirusDetective™'s Mods Text.txt < prev    next >
Text File  |  1989-06-16  |  5KB  |  100 lines

  1. The resources VirusDetectiveΓäó looks for may be modified below.  You can also save search strings to a text file (see ΓÇ£Option ConfigurationΓÇ¥ to set file type) or read from a text file containing one search string per line.
  2.  
  3. What gets written is the currently *displayed* set of search strings which may not reflect what is stored in VirusDetectiveΓäó unless a Save is done.  Likewise, when you read in a file, it only replaces what is displayed and is not stored until a Save is done.
  4.  
  5. The syntax is as follows:
  6.  
  7.   <search-string> :=
  8.      <file-string> {; Comment}
  9.      <file-string> & <resource-string> {; Comment}
  10.      <resource-string> {; Comment}
  11.  
  12. This says a search string is either a <file-string>, a <file-string> followed by the character ΓÇÿ&ΓÇÖ followed by a <resource-string> or just a <resource-string>.  All of them may be followed by an optional (indicated by the {}ΓÇÖs) ΓÇÿ;ΓÇÖ and comment string.
  13.  
  14. <file-string>ΓÇÖs can actually occur anywhere in the search-string, not just at the beginning.  In general you want them first to speed the search process.
  15.  
  16.   <file-string> :=
  17.      Creator <op> <CID>
  18.      Filetype <op> <FID>
  19.   <op> :=
  20.      =
  21.      Γëá
  22.      >
  23.      <
  24.    <CID> := 4 character file creator
  25.    <FID> := 4 character file type
  26.  
  27. This says a <file-string> is the word ΓÇ£CreatorΓÇ¥ or ΓÇ£FiletypeΓÇ¥ followed by a comparison operator ΓÇÿ=ΓÇÖ (for ΓÇ£is equal toΓÇ¥), ΓÇÿΓëáΓÇÖ (for ΓÇ£is not equal toΓÇ¥) (type Option-= to get this character), ΓÇÿ>ΓÇÖ (for ΓÇ£is greater thanΓÇ¥) or ΓÇÿ<ΓÇÖ (for ΓÇ£is less thanΓÇ¥) followed by a four character file creator or filetype.  E.g. ΓÇ£Filetype = APPLΓÇ¥ would match all applications.
  28.  
  29.   <resource-string> :=
  30.      <resource-selector> & <resource-comp> [ & <resource-comp>]
  31.  
  32. A <resource-string> is a <resource-selector> followed by one or more (indicated by the []ΓÇÖs) <resource-comp>ΓÇÖs each separated by a ΓÇÿ&ΓÇÖ.
  33.  
  34.   <resource-selector> :=
  35.      Resource Start
  36.      Resource <RID>
  37.   <RID> := 4 character resource type
  38.  
  39. A <resource-selector> is either ΓÇ£Resource StartΓÇ¥ which means the first executed CODE resource or ΓÇ£Resource XXXXΓÇ¥ where XXXX is some resource type like ΓÇ£nVIRΓÇ¥.  Note:  It *must* be exactly 4 characters, including spaces.
  40.  
  41.   <resource-comp> :=
  42.      Any
  43.      Data <pattern>
  44.      ID <op> <snum>
  45.      Name <sep><string><sep>
  46.      Pos <snum> & Data <pattern>
  47.      Size <op> <num>
  48.   <snum> :=
  49.      -<num>
  50.      <num>
  51.   <num> := unsigned decimal number
  52.   <sep> := any single character
  53.   <string> := string of up to 255 characters
  54.  
  55. Any -
  56.    Matches any <resource-selector> resource.  E.g. ΓÇ£Resource nVIR & AnyΓÇ¥ would match any nVIR resource.
  57.  
  58. Data -
  59.    Matches any <resource-selector> resource containing the <pattern> (described below).  You can specify an optional starting offset position with the ΓÇ£PosΓÇ¥ keyword.  Positive offsets add to the beginning and negative offsets subtract from the end.  E.g. ΓÇ£Resource Start & Pos -1344 & Data 060CA9#643E9ΓÇ¥ starts searching the first executed CODE resource for that pattern 1344 bytes from the end of it.
  60.  
  61. The ΓÇ£DataΓÇ¥ keyword must be the last keyword in a search string. The ΓÇ£PosΓÇ¥ keyword (if present) can occur anywhere before the ΓÇ£DataΓÇ¥ keyword.
  62.  
  63. ID -
  64.    Matches any <resource-selector> resource whose resource ID satisfies the given relationship.  E.g. ΓÇ£Resource CODE & ID > 10ΓÇ¥ matches any CODE resource whose ID is greater than 10.
  65.  
  66. Name -
  67.    Matches any <resource-selector> resource whose name is enclosed in the separator characters.  E.g. ΓÇ£Resource INIT & Name "RR"ΓÇ¥.
  68.  
  69. Size -
  70.    Matches any <resource-selector> resource whose resource size satisfies the given relationship.  E.g. ΓÇ£Resource MEV# & Size = 722ΓÇ¥ matches any MEV# resource whose size is equal to 722.
  71.  
  72.   <pattern> :=
  73.      <hex-pattern>
  74.      <ascii-pattern>
  75.   <hex-pattern> :=
  76.      <hex-byte-word>{<hex-pattern>}
  77.      #<hex-char>{<hex-pattern>}
  78.   <hex-byte-word> :=
  79.      <hex-char><hex-char>
  80.   <hex-char> := character 0 through 9 or A through F
  81.   <ascii-pattern> :=
  82.      "<string>"
  83.      '<string>'
  84.  
  85. A Data match pattern can be specified as a sequence of hex digits, two per byte, or as a ASCII string enclosed in either single or double quotes.  An ASCII pattern must match its entire pattern exactly to be considered ΓÇ£a matchΓÇ¥.  A hex pattern can ΓÇ£skipΓÇ¥ bytes by using the ΓÇÿ#ΓÇÖ character followed single hex character, 0 through F, to skip 0 through 15 bytes.  E.g. pattern 3C#500 would match a resource containing 3C12C9006A8000.
  86.  
  87. Spaces may be used between search-string parts to improve readability.  Only the first 255 characters of a search-string are saved.
  88.  
  89. You can use Command-C to copy any selected search pattern and Command-V to paste it into the type-in buffer for editing.
  90.  
  91. Examples of valid search strings are:
  92.  
  93. Resource Start & Size<800 & Data 2F3A#F00#C80 ; For finding nVIR, etc. (Appl's/Finder)
  94. Filetype=ZSYS & Resource INIT & Size<800 & Data 2F3A#F00#C80 ; For finding nVIR, etc. (System)
  95. Resource Start & Size<800 & Data 41FA#92E#797 ; For finding INIT29 in Appl's/Finder
  96. FiletypeΓëáAPPL & Resource INIT & Size<800 & Data 41FA#92E#797 ; For finding INIT29 in non-Appl's
  97. Resource Start & Size<8000 & Data FD38#FBA#5A3 ; For finding Scores in Appl's/Finder
  98. FiletypeΓëáAPPL & Resource INIT & Size<1100 & Data FD38#FBA#5A3 ; For finding Scores in System, etc.
  99. Resource Start & Pos -1344 & Data 060CA9#643E9 ; For finding ANTI
  100. Resource INIT & Name "RR" ; For finding Peace